TimesUsed()

General System Function

Syntax samples

TIMESUSED(<resource>)

IF TIMESUSED(Res1) > 5 then USE Res2 for 10

Description

Returns the number of times a resource has been used.

Valid In

Any logic and any field evaluated after translation. For a list of fields evaluated after translation, see the Appendix A.

Components

<resource>

The name of the resource to examine. RES() may be used here.

Example

In the example below, when an EntA arrives at Loc1, it will only use the resource Res1 if the resource has been used five or fewer times. If the resource has been used more than five times, EntA will use Res2 instead.

Process Table

Entity

Location

Operation (min)

EntA

Loc1

IF TIMESUSED (Res1)> 5

THEN USE Res2 FOR 10

ELSE USE Res1 FOR 10

Routing Table

Blk

Output

Destination

Rule

Move Logic

 

 

 

 

 

See Also

UNITS().